import axios from "../utils/axios";

const findAll = async (v:any) => {
  const data = await axios({
    url: "/groupinfo/findAllByCompanyId?id="+v+"",
    method: "get",
  });
  return data;
};

const findAllInsOrder = async (v: any) => {
  const data = await axios({
    url: "/group/findById?id=" + v + "",
    method: "get",
  });
  return data;
};

const findSubOrganOrder =async(v:any)=>{
  return await axios({
    url: "/package/findPackageById?id=" + v + "",
  });
}

const addPersonExam = async (v: any) => {
  return await axios({
    url: "/groupinfo/add",
    method:'post',
    data:v
  });
};

const delete1All = async (v: any) => {
  return await axios({
    url: "/groupinfo/deleteByIds",
    method: "post",
    data: v,
  });
};

const updatePreDateBatches = async (v: any) => {
  return await axios({
    url: "/groupinfo/updatePreDateBatches",
    method: "post",
    data: v,
  });
};

const updateCanclePreBatches = async (v: any) => {
  return await axios({
    url: "/groupinfo/updateCanclePreBatches",
    method: "post",
    data: v,
  });
};


export {
  findAll,
  findAllInsOrder,
  findSubOrganOrder,
  addPersonExam,
  delete1All,
  updatePreDateBatches,
  updateCanclePreBatches,
};
